home *** CD-ROM | disk | FTP | other *** search
/ Enter 2010 January / ENTER_2010_01.iso / Programy / Gry / Base_Invaders_ / BaseInvadersSetup1.3.exe / {app} / Scripts / TeraTest.lua < prev    next >
Encoding:
Text File  |  2007-01-25  |  1.4 KB  |  76 lines

  1. G.SetGroup( "Cam" )
  2. local Cam = G.Create( "Data/BasicCamera.xml");
  3. local pos = Vector3(50,60,50);
  4. Cam.SetPosition( pos );
  5. G.File( "Data/Terra.xml");
  6.  
  7.  
  8. function DooDad()
  9.     if( G.KeyTriggered( "F" ) ) then
  10.         local d = G.Create( "Data/LargePineTree.xml" );
  11.         local mpos = G.GetTerrainIntersection();
  12.         d.SetPosition( mpos );
  13.     end        
  14.     
  15.     if( G.KeyTriggered( "R" ) ) then
  16.         local d = G.Create( "Data/Effects/VortexEffect.xml" );
  17.         local mpos = G.GetTerrainIntersection();
  18.         d.SetPosition( mpos );
  19.     end            
  20.         
  21. end
  22.     
  23.  
  24.  
  25.  
  26. function MonoChrome()
  27.     G.DoPostPass( "MonoChrome",  1, 1, 0 );
  28. end
  29.  
  30.  
  31. function MonoBlur()
  32.     G.BlurBuffer( 1 , 5);
  33.     G.DoPostPass( "MonoChrome",  1, 1, 0 );    
  34. end
  35.  
  36. function Test()
  37.     G.DoPostPass( "DownSample",  1, 1, 2 );
  38.     G.DoPostPass( "Threshold",  2, 2, 3 );
  39.     G.BlurBuffer( 3 , 5);
  40.     --G.DoPostPass( "MonoChrome",  3, 3, 0 );            
  41.     --G.DoPostPass( "Blend" ,         2, 2, 0 );    
  42.     G.DoPostPass( "FinalGlare" , 1, 3, 0 );
  43. end
  44.  
  45.  
  46. function Invert()
  47.     G.DoPostPass( "Invert",  1, 1, 0 );
  48. end
  49.         
  50.             
  51. GMain[ "DooDad" ] = DooDad;        
  52.  
  53. function ScreenCapFunc()
  54.             
  55.     if( G.KeyTriggered( "C" ) ) then
  56.         G.ScreenCap()
  57.     end
  58.     
  59.     if( G.KeyTriggered( "N" ) ) then
  60.         G.LightCycle()
  61.     end
  62.  
  63.     if( G.KeyTriggered( "I" ) ) then
  64.         G.IncreaseLight()
  65.     end
  66.     
  67.     
  68.     if( G.KeyTriggered( "K" ) ) then
  69.         G.DecreaseLight()
  70.     end
  71.     
  72. end
  73.  
  74. GMain["ScreenCapFunc"] = ScreenCapFunc;
  75.  
  76.